package eerbaar.shared.internal.persist.save;

import java.util.Stack;

import eerbaar.shared.tree.INode;

@SuppressWarnings("serial")
public class NodeStack extends Stack<INode> {

    @Override
    public synchronized String toString() {

        String s = "stack(";
        for (int i = 0; i < super.size(); i++) {
            if (i > 0) {
                s += ", ";
            }
            s += super.get(i).getPayload().getKey();
        }
        s += ")";
        return s;
    }

}
